<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <link rel="stylesheet" href="/js/login/css/login.css">

    <script src="/js/login/js/jQuery1.7.js"></script>
    <script src="/js/login/js/jquery-1.8.2.min.js"></script>
    <script src="/js/login/js/Validform_v5.3.2_min.js"></script>


<script type="text/javascript">

    $(function(){
        $(".screenbg ul li").each(function(){
            $(this).css("opacity","0");
        });
        $(".screenbg ul li:first").css("opacity","1");
        var index = 0;
        var t;
        var li = $(".screenbg ul li");
        var number = li.size();
        function change(index){
            li.css("visibility","visible");
            li.eq(index).siblings().animate({opacity:0},3000);
            li.eq(index).animate({opacity:1},3000);
        }
        function show(){
            index = index + 1;
            if(index<=number-1){
                change(index);
            }else{
                index = 0;
                change(index);
            }
        }
        t = setInterval(show,3000);
        //根据窗口宽度生成图片宽度
        var width = $(window).width();
        $(".screenbg ul img").css("width",width+"px");
    });



    $(function(){
        getDate();
    })

    function getDate(){

        $("#span1").html(new Date().toLocaleString());
    }

    function queryUserLogin(){
        $.ajax({
            url:"/view/loginStaff",
            type:"POST",
            data:$("#user_form").serialize(),
            async:false,
            success:function(result){
                if(result){

                    location.href = "/view/toView?viewName=index";
                }else{

                    $("#msg").html("密码或账号有误");
                    $("#msg").css('color','red');
                    $("#msg").css('size','7px');
                }
            },
            error:function(){
                alert("失败了");
            }
        })

    }


</script>


</head>

<body>
<div id="tab">
    <ul class="tab_menu">
        <!--    <li class="selected">用户登录</li>
         <li>导师登录</li>
          <li>教务登录</li> -->
    </ul>
    <div class="tab_box">
        <!-- 学生登录开始 -->
        <div>

            <span  id="msg">员工登录</span>
            <form  id="user_form" >
                <div id="username">
                    <label>帐&nbsp;&nbsp;&nbsp;号：</label>
                    <input type="text" name="staffName"/>
                </div>
                <div id="password">
                    <label>密&nbsp;&nbsp;&nbsp;码：</label>
                    <input type="password"  name="staffPwd"/>
                </div>

                <div id="remember">
                    <input type="checkbox" name="remember">
                    <label>记住密码&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">短信验证</a></label>
                </div>
                <div id="login">
                    <input type="button" value="登录"  style="width:260px; height:50px; color:red" onclick="queryUserLogin()">
                </div>
            </form>
        </div>
        <!-- 学生登录结束-->

    </div>
</div>
<div class="bottom">
    <span id="span1"></span>
</div>
<div class="screenbg">
    <ul>
        <li><a href="javascript:;"><img src="/js/login/images/0.jpg"></a></li>
        <li><a href="javascript:;"><img src="/js/login/images/1.jpg"></a></li>
        <li><a href="javascript:;"><img src="/js/login/images/2.jpg"></a></li>
    </ul>
</div>
</body>
</html>